using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Resources;
using System.Reflection;
/// <summary>
/// Summary description for bzLang
/// </summary>
public class bzLang
{
    private DataRow lang = null;
    public DataRow Lang { get { return this.lang; } }

    public struct Language
    {
        private static string _Vietnamese = "VN";
        public static string Vietnamese { get { return _Vietnamese; } }

        private static string _English = "EN";
        public static string English { get { return _English; } }
    }
    private string _TableName = "bzLang";
    public static string checkLang(string strLang)
    {
        switch (strLang)
        {
            case "EN": return "EN";
            default: return Language.Vietnamese;
        }
    }
    public bzLang(string strLang, string Note)
    {
        this.loadLang(strLang, Note);
    }
    public void loadLang(string strLang, string Note)
    {
        SqlParameter[] p = new SqlParameter[2];
        p[0] = new SqlParameter("@Table", _TableName);
        p[1] = new SqlParameter("@Note", Note);
        DataTable dt = new dbConnection().getDataTable("SP_getLang", p);
        DataTable tmp = new DataTable();
        foreach (DataRow dr in dt.Rows)
        {
            DataColumn col = new DataColumn(dr["Name"].ToString(), typeof(string));
            tmp.Columns.Add(col);
        }
        this.lang = tmp.NewRow();
        foreach (DataRow dr in dt.Rows)
        {
            this.lang[dr["Name"].ToString()] = dr["Enabled"].ToString() == "0" ? "" : dr["Value" + strLang].ToString();
        }
    }


   
    private static string _Note_Default = "Default";
    public static string Note_Default { get { return _Note_Default; } }


    private static string _Note_About = "About";
    public static string Note_About { get { return _Note_About; } }

    private static string _Note_Service = "Service";
    public static string Note_Service { get { return _Note_Service; } }

    private static string _Note_NewsOne = "NewsOne";
    public static string Note_NewsOne { get { return _Note_NewsOne; } }



    private static string _Note_Contact = "Contact";
    public static string Note_Contact { get { return _Note_Contact; } }

    private static string _Note_FAQ = "FAQ";
    public static string Note_FAQ { get { return _Note_FAQ; } }

    private static string _Note_Gallery = "Gallery";
    public static string Note_Gallery { get { return _Note_Gallery; } }

    private static string _Note_Brand = "Brand";
    public static string Note_Brand { get { return _Note_Brand; } }

    private static string _Note_AddShop = "AddShop";
    public static string Note_AddShop { get { return _Note_AddShop; } }

    private static string _Note_BuySel = "BuySel";
    public static string Note_BuySel { get { return _Note_BuySel; } }
 
    private static string _Note_Template = "Template";
    public static string Note_Template { get { return _Note_Template; } }



    private static string _None = "";
    public static string None { get { return _None; } }
}
